package com.cwj.demo.config;

import com.cwj.demo.bean.UserManager;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class UserConfig {

    @Value("${user.name}")
    private String userName;

    @Bean
    public UserManager userManager() {
        UserManager userManager = new UserManager(userName);
        return userManager;
    }

}
